<%-- 
    Document   : managerIndex
    Created on : Oct 8, 2012, 6:54:36 PM
    Author     : Nhan
--%>

<%@page import="com.User"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <%
           session = request.getSession();
           User curUser = (User)session.getAttribute("currentUser");
           if(curUser != null) {
                String role = curUser.getRole().trim();
                if(!role.equalsIgnoreCase("manager"))
                out.println("<h1>Only Manager can enter this area!<h1>");
                else {
        %>
        
        <h1>Welcome <%= curUser.getFirstName() %></h1>
        <h3>Here are some task for you</h3>
        <ol>
            <li><a href="../centralUnit?action=manageBook">Manage Book In Store</a></li>
            <li><a href="../centralUnit?action=manageOrder">Manage Order</a></li>
            <li><a href="../centralUnit?action=manageAccount">Manage Account</a></li>
        </ol>
             <% }
        } %>
    </body>
</html>
